package com.yzt.sys.service.impl;

import com.yzt.sys.entity.User;
import com.yzt.sys.mapper.UserMapper;
import com.yzt.sys.service.IUserService;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.yzt.base.service.impl.BaseServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author Y
 * @since 2021-01-25
 */
@Service
public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implements IUserService {

	@Override
	public boolean exit(String username) {
		User user = this.getOne(Wrappers.<User>lambdaQuery().eq(User::getUsername, username));
		if (user != null)
			return true;
		return false;
	}

}
